﻿using System;

namespace PartsTracker
{

    public class Part
    {
        [PrimaryKeyAttribute, MaxLength(100)]
        public string PartName { get; set; }
        public int TotalHours { get; set; }
        public string Tool { get; set; }

        public override string ToString()
        {
            return PartName + "\t" + Tool;
        }
    }

    public class PartHistory
    {
        [MaxLength(100)]
        public string PartName { get; set; }
        public int HoursEntered { get; set; }
        public DateTime Date { get; set; }
        public string Comment { get; set; }


        public DateTime DateModified { get; set; }
        public string ModifiedBy { get; set; }

        public override string ToString()
        {
            return DateModified + "\t" + ModifiedBy + "\t" + HoursEntered.ToString();
        }
    }

}
